<?php
namespace App\Models\Entity\wxbox;

use Swoft\Db\Model;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;
use Swoft\Db\Types;

/**
 * @Entity()
 * @Table(name="fdtoken")
 * @uses      Fdtoken
 */
class Fdtoken extends Model
{
    /**
     * @var int $id 
     * @Id()
     * @Column(name="id", type="integer")
     */
    private $id;

    /**
     * @var string $openid 
     * @Column(name="openid", type="string", length=64)
     * @Required()
     */
    private $openid;

    /**
     * @var string $token 
     * @Column(name="token", type="string", length=64)
     * @Required()
     */
    private $token;

    /**
     * @var int $status 1使用0关闭
     * @Column(name="status", type="smallint", default=1)
     */
    private $status;

    /**
     * @var int $wxid 
     * @Column(name="wxid", type="integer", default=0)
     */
    private $wxid;

    /**
     * @param int $value
     * @return $this
     */
    public function setId(int $value)
    {
        $this->id = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setOpenid(string $value): self
    {
        $this->openid = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setToken(string $value): self
    {
        $this->token = $value;

        return $this;
    }

    /**
     * 1使用0关闭
     * @param int $value
     * @return $this
     */
    public function setStatus(int $value): self
    {
        $this->status = $value;

        return $this;
    }

    /**
     * @param int $value
     * @return $this
     */
    public function setWxid(int $value): self
    {
        $this->wxid = $value;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getOpenid()
    {
        return $this->openid;
    }

    /**
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * 1使用0关闭
     * @return mixed
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * @return int
     */
    public function getWxid()
    {
        return $this->wxid;
    }

}
